package com.dstz.bpm.api.constant;

public enum NodeStatus {
   SUBMIT("submit", "提交"),
   RE_SUBMIT("resubmit", "重新提交"),
   AGREE("agree", "同意"),
   PENDING("pending", "待审批"),
   OPPOSE("oppose", "反对"),
   BACK("back", "驳回"),
   BACK_TO_START("backToStart", "驳回到发起人"),
   COMPLETE("complete", "完成"),
   RECOVER("recover", "撤回"),
   RECOVER_TO_START("recoverToStart", "撤回到发起人"),
   SIGN_PASS("sign_pass", "会签通过"),
   SIGN_NO_PASS("sign_no_pass", "会签不通过"),
   MANUAL_END("manual_end", "人工终止"),
   ABANDON("abandon", "弃权"),
   SUSPEND("suspend", "挂起");

   private String key = "";
   private String value = "";

   private NodeStatus(String key, String value) {
      this.key = key;
      this.value = value;
   }

   public String getKey() {
      return this.key;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getValue() {
      return this.value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   public String toString() {
      return this.key;
   }

   public static NodeStatus fromKey(String key) {
      NodeStatus[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         NodeStatus c = var1[var3];
         if (c.getKey().equalsIgnoreCase(key)) {
            return c;
         }
      }

      throw new IllegalArgumentException(key);
   }
}
